<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/resources/template/template.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:p="http://primefaces.org/ui">


    <ui:define name="content">

        <h:panelGroup >
            <h:form id="form"  >
                <p:growl />
                <p:panel id="panalItem"  >
                    <f:facet name="header" >
                        <h:outputLabel value="Institution Delete"></h:outputLabel>
                    </f:facet>

                    <p:commandButton ajax="false" value="Remove Selected" styleClass="noPrintButton" action="#{institutionController.removeSelectedItems()}">
                    </p:commandButton>

                    <p:dataTable id="dtF" value="#{institutionController.items}" var="sv" 
                                 rowKey="#{sv.id}" selection="#{institutionController.itemsToRemove}" 
                                 rows="10"
                                 paginator="true"
                                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                                 rowsPerPageTemplate="10,50,100,500"
                                 >
                        <p:column id="colSelect"  selectionMode="multiple" >
                        </p:column>

                        <p:column headerText="Type" sortBy="#{sv.institutionType.label}" filterBy="#{sv.institutionType.label}" filterMatchMode="contains"
                                  style="font-weight:normal ;color: black;text-align: left;" >
                            <h:outputLabel value="#{sv.institutionType.label}" />
                        </p:column>
                        <p:column headerText="Instiution" filterBy="#{sv.name}" filterMatchMode="contains" sortBy="#{sv.name}"
                                  style="font-weight:normal ;color: black;text-align: left; width: 400px;overflow: hidden;">
                            <h:outputLabel value="#{sv.name}" />
                        </p:column>
                        <p:column headerText="Address" filterBy="#{sv.address}" filterMatchMode="contains" sortBy="#{sv.address}"
                                  style="font-weight:normal ;color: black;text-align: left;overflow: hidden;">
                            <h:outputLabel value="#{sv.address}" />
                        </p:column>

                        <p:column headerText="Created By" 
                                  style="font-weight:normal ;color: black;text-align: left;"
                                  filterBy="#{sv.creater.webUserPerson.name}" filterMatchMode="contains"
                                  sortBy="#{sv.creater.webUserPerson.name}" >
                            <h:outputLabel value="#{sv.creater.webUserPerson.name}" />
                        </p:column>
                        
                        <p:column headerText="Created At" 
                                  style="font-weight:normal ;color: black;text-align: left;width: 200px;"
                                  sortBy="#{sv.createdAt}" >
                            <h:outputLabel value="#{sv.createdAt}" >
                                <f:convertDateTime pattern="dd MMMM yyyy hh:mm a" ></f:convertDateTime>
                            </h:outputLabel>
                        </p:column>
                        
                    </p:dataTable>




                </p:panel>
            </h:form>

        </h:panelGroup>

        <h:form>




        </h:form>


    </ui:define>

</ui:composition>
